<br /><br />
<!--<div id="view-content">
    <p>View script for controller <b>Visiteur</b> and script/action name <b>index</b></p>
</div>-->
<center>
    <a href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'ajouter')) ?>">Ajouter</a>
    <table>

        <tr>
            <th>Id</th>
            <th>Nom</th>
            <th>Prenom</th>
            <th>adresse</th>
            <th>cp</th>
            <th>ville</th>
            <th>date Embauche</th>
            
        </tr>
        <?php foreach ($this->paginator as $unVisiteur): ?>
            <tr>
                <td><?php echo $this->escape($unVisiteur['id']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['nom']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['prenom']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['adresse']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['cp']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['ville']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['dateEmbauche']); ?></td> 
                <td>

                    <a href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'modifier', 'id' => $unVisiteur['id'])) ?>">Modifier</a>
                    <a href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'supprimer', 'id' => $unVisiteur['id'])) ?>">Supprimer</a>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <?php
    $pages = $this->paginator->getPages();

    echo "<a href=?page=$pages->first>debut</a>&nbsp &nbsp";


    if (isset($pages->previous)) {
        echo "<a href=?page=$pages->previous>precedent</a>&nbsp &nbsp";
    }


    foreach ($pages->pagesInRange as $page) {
        echo "<a href=?page=$page>$page</a>&nbsp &nbsp";
    }

    if (isset($pages->next)) {
        echo "<a href=?page=$pages->next>suivant</a>&nbsp &nbsp";
    }


    echo "<a href=?page=$pages->last>fin</a>&nbsp &nbsp";
    ?>
</center>